var Mongo_local =
  process.env.MONGOLAB_URI || 'mongodb://127.0.0.1:27017/BookLib_local';
var Mongo_prod =
  process.env.MONGOLAB_URI || 'mongodb://127.0.0.1:27017/BookLib_local';

var config = {
  local: {
    mode: 'local',
    port: 8050,
    mongoHost: '82.156.173.83',
  },
  prod: {
    mode: 'prod',
    port: process.env.PORT || 8050,
    mongoHost: '127.0.0.1',
  },
};

function getConfig(mode) {
  return config[mode || process.argv[2] || 'local'] || config.local;
}

export { getConfig };
